import { createStore, combineReducers, applyMiddleware } from 'redux';
import cartReducer from './modules/cart'

import logger from 'redux-logger'

const rootReducer = combineReducers({
  car: cartReducer
})

const store = createStore(rootReducer, applyMiddleware(logger as any))
// 获取仓库类型
export type RootState = ReturnType<typeof store.getState>

export default store